﻿

using System.Xml.Linq;

namespace AppData
{

    //public enum BookGenre
    //{
    //    A,//General Works (总论)
    //    B,//Philosophy, Psychology, Religion (哲学、心理学、宗教)
    //    C,//Auxiliary Sciences of History (历史辅助科学)
    //    D,//World History and History of Europe, Asia, Africa, Australia, New Zealand, etc. (世界历史及欧洲、亚洲、非洲、澳大利亚、新西兰等地区历史)
    //    E,//- History of the Americas (美洲历史)
    //    G,//Geography, Anthropology, Recreation (地理、人类学、休闲)
    //    H,//Social Sciences (社会科学)
    //    J,//Political Science (政治科学)
    //    K,//Law (法律)
    //    L,//Education (教育)
    //    M,//Music (音乐)
    //    N,//Fine Arts (美术)
    //    O,//Others(其他)
    //    P,//Language and Literature (语言和文学)
    //    Q,//Science (科学)
    //    R,//Medicine (医学)
    //    S,//Agriculture (农业)
    //    T,//Technology (技术)
    //    U,//Military Science (军事科学)
    //    V,//Naval Science (海军科学)
    //    Z,//Bibliography, Library Science (文献学、图书馆学)
    //}

    public class MovieInfo
    {
        public int episodeCount;
        public string sub_genre;
        public string name;
        public string description;
        public string author;
        public string publisher;
        public int publishDate;
        public string icon;
        public long watchTimes;

        public MovieInfo(int episodeCount,string subGenre, string name, string description, string author, string publisher, int publishDate,string icon,long watchTimes)
        {
            this.episodeCount = episodeCount;
            sub_genre = subGenre;
            this.name = name;
            this.description = description;
            this.author = author;
            this.publisher = publisher;
            this.publishDate = publishDate;
            this.icon = icon;
            this.watchTimes = watchTimes;
        }
    }

    public class ShortMovie
    {
        public long id;

        public MovieInfo info;
        public VideoData[] episodes;
        public int episodeCount => episodes?.Length?? 0;

        public override string ToString()
        {
            return $"[{id},{info.name},{info.sub_genre}]";
        }
    }

    //public class Video
    //{
    //    //public int episodeId;
    //    public string url;
    //    public string icon;
    //    public string title;
    //    public string desc;
    //    public int publishedDate;
    //    public bool approved;
    //}

}
